package com.sokal.easycare.modules.position.entity;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sokal.easycare.common.persistence.DataEntity;
import com.sokal.easycare.modules.sys.entity.MainUser;

/**
 * 岗位Entity
 * 
 * @author yangmin
 * @version 2017-04-08
 */
public class Duty extends DataEntity<Duty> {

	private static final long serialVersionUID = 1L;
	private String dutyName; // 岗位名称
	private String dutyLevel; // 岗位级别
	private String dutyDesc; // 岗位描述

	private MainUser mainUser; // 用户，用于查询

	public Duty() {
		super();
	}

	public Duty(String id) {
		super(id);
	}

	public Duty(MainUser mainUser) {
		this.mainUser = mainUser;
	}

	@Length(min = 1, max = 50, message = "岗位名称长度必须介于 1 和 50 之间")
	public String getDutyName() {
		return dutyName;
	}

	public void setDutyName(String dutyName) {
		this.dutyName = dutyName;
	}

	@JsonIgnore
	public String getDutyLevel() {
		return dutyLevel;
	}

	public void setDutyLevel(String dutyLevel) {
		this.dutyLevel = dutyLevel;
	}

	@JsonIgnore
	@Length(min = 0, max = 250, message = "岗位描述长度必须介于 0 和 250 之间")
	public String getDutyDesc() {
		return dutyDesc;
	}

	public void setDutyDesc(String dutyDesc) {
		this.dutyDesc = dutyDesc;
	}

	@JsonIgnore
	public MainUser getMainUser() {
		return mainUser;
	}

	public void setMainUser(MainUser mainUser) {
		this.mainUser = mainUser;
	}

}